/*
 * Copyright Aduna (http://www.aduna-software.com/) (c) 2007.
 *
 * Licensed under the Aduna BSD-style license.
 */
package edu.tju.rdfbase.store.config;

import edu.tju.rdfbase.store.Store;
import edu.tju.rdfbase.store.StoreConfigException;

/**
 * A StoreFactory takes care of creating and initializing a specific type of
 * {@link Store}s based on RDF configuration data. StoreFactory's are used by the
 * {@link edu.tju.rdfbase.repository.store.config.StoreRepositoryFactory} to create
 * specific Stores and to initialize them based on the configuration data that
 * iis supplied to it, for example in a server environment.
 * 
 * @author Arjohn Kampman
 */
public interface StoreFactory {

	/**
	 * Returns the type of the Stores that this factory creates. Store types are
	 * used for identification and should uniquely identify specific
	 * implementations of the Store API. This type <em>can</em> be equal to the
	 * fully qualified class name of the Store, but this is not required.
	 */
	public String getStoreType();

	public StoreImplConfig getConfig();

	/**
	 * Returns a Store instance that has been initialized using the supplied
	 * configuration data.
	 * 
	 * @param config
	 *        TODO
	 * @return The created (but un-initialized) Store.
	 * @throws StoreConfigException
	 *         If no Store could be created due to invalid or incomplete
	 *         configuration data.
	 */
	public Store getStore(StoreImplConfig config)
		throws StoreConfigException;
}
